package com.example.library.dao;

import com.example.library.bean.model.FavoriteOrder;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

public interface FavoriteOrderRepository extends JpaRepository<FavoriteOrder,Long> {

    FavoriteOrder findByBook_BookIdAndUser_UserId(long bookId,long userId);

    List<FavoriteOrder> findAllByUser_UserId(long userId);

}
